import {createApp} from 'vue'
import App from './App.vue'
import { focus,color,auth,} from '@/directive'
import ElementPlus from 'element-plus'
import './styles/index.scss'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import {createPinia} from 'pinia'

import router from './router'
// 注意: 权限文件(要在路由导入之后处理)
import './permission'
import AuthBtn from './components/ AuthBtn.vue'

const app = createApp(App)
app.use(ElementPlus, {locale: zhCn})
app.use(createPinia())
app.use(router)
// 注册自定义指令
app.directive("focus", focus);
app.directive("color", color);
app.directive("auth-btn", auth);
// 全局注册组件
app.component("auth-btn", AuthBtn);
app.mount('#app')
